

package com.hazelcast.jet.pipeline.test;

import com.hazelcast.jet.Job;
import com.hazelcast.jet.annotation.EvolvingApi;

import java.io.Serial;

/**
 * An exception which indicates that an assertion passed successfully. It is
 * used to terminate the streaming job. If caught from the {@link Job#join()}
 * method, it can be ignored.
 *
 * @since Jet 3.2
 */
@EvolvingApi
public final class AssertionCompletedException extends RuntimeException {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * Creates the exception
     */
    public AssertionCompletedException() {
    }

    /**
     * Creates the exception with the given message
     */
    public AssertionCompletedException(String message) {
        super(message);
    }

    /**
     * Creates the exception with the given message and cause
     */
    public AssertionCompletedException(String message, Throwable cause) {
        super(message, cause);
    }
}
